Expand description

Ratchet’s core implementation. See the Ratchet crate for usage.

Structs

A reason for closing the WebSocket connection.

The errors that may occur during a WebSocket connection.

An invalid header was received.

An extension stub that does nothing.

An extension provider stub that will always succeed with NoExt.

A subprotocol registry that is used for negotiating a possible subprotocol to use for a connection.

A structure representing an upgraded WebSocket session and an optional subprotocol that was negotiated during the upgrade.

A structure representing an upgraded WebSocket session and an optional subprotocol that was negotiated during the upgrade.

An upgraded WebSocket stream.

A builder to construct WebSocket clients.

A configuration for building a WebSocket.

A response to send to a client if the connection will not be upgraded.

A builder to construct WebSocket servers.

Represents a client connection that has been accepted and the upgrade request validated. This may be used to validate the request by a user and opt to either continue the upgrade or reject the connection - such as if the target path does not exist.

Enums

The channel is closed

Additional implementation sources:

Denotes the current state of a WebSocket session.

A type of error represented.

HTTP errors.

A received WebSocket frame.

A message type to send.

The type of a payload to send to a peer.

WebSocket protocol errors.

The role of a WebSocket.

Traits

A trait for creating a request from a type.

A stream representing a WebSocket connection.

Functions

Execute a server handshake on the provided stream.

Execute a server handshake on the provided stream. An attempt will be made to negotiate the extension and subprotocols provided.

Execute a WebSocket client handshake on stream, opting for no compression on messages and no subprotocol.

Execute a WebSocket client handshake on stream, attempting to negotiate the extension and a subprotocol.